package com.yunji.base.domain;

import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * @Package com.yunji.user
 * FileName:	Wechat.java
 * Copyright:	Copyright © 2024 云集互联 All Rights Reserved
 * Company:		云集互联
 * @version: 1.0
 * @since: JDK 1.8.0_202
 * Create at:   2024-04-06 23:25:45
 * Description:
 * 微信登录信息
 * Modification History:
 * Author					Date					Version         Description
 * -------------------------------------------------------------------------------------
 * HuaAo0803@163.com	2024-04-06 23:25:45             1.0						1.0 Version
 */
public class LoginWechatDO implements Serializable {
    private static final long serialVersionUID = -3709418248520722632L;
    /**
     * 登录时获取的 code 前端提供
     */
    @ApiModelProperty("微信code")
    private String code;

    /**
     * 包括敏感数据在内的完整用户信息的加密数据 - 手机号
     */
    @ApiModelProperty("包括敏感数据在内的完整用户信息的加密数据")
    private String phoneEncryptedData;

    /**
     * 包括敏感数据在内的完整用户信息的加密数据
     */
    @ApiModelProperty("包括敏感数据在内的完整用户信息的加密数据据")
    private String userinfoEncryptedData;

    /**
     * 加密算法的初始向量 - 手机号
     */
    @ApiModelProperty("加密算法的初始向量 - 手机号")
    private String phoneIv;

    /**
     * 加密算法的初始向量
     */
    @ApiModelProperty("加密算法的初始向量")
    private String userinfoIv;

    /**
     * 用户信息对象，不包含 openid 等敏感信息
     */
    @NotNull(message = "userInfo 不能为空")
    @ApiModelProperty("用户信息对象，不包含 openid 等敏感信息")
    private String userInfo;

    @ApiModelProperty("用户手机号")
    private String phone;

    @ApiModelProperty("用户昵称")
    private String nickName;

    @ApiModelProperty("用户性别")
    private Long gender;

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Long getGender() {
        return gender;
    }

    public void setGender(Long gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getPhoneEncryptedData() {
        return phoneEncryptedData;
    }

    public void setPhoneEncryptedData(String phoneEncryptedData) {
        this.phoneEncryptedData = phoneEncryptedData;
    }

    public String getUserinfoEncryptedData() {
        return userinfoEncryptedData;
    }

    public void setUserinfoEncryptedData(String userinfoEncryptedData) {
        this.userinfoEncryptedData = userinfoEncryptedData;
    }

    public String getPhoneIv() {
        return phoneIv;
    }

    public void setPhoneIv(String phoneIv) {
        this.phoneIv = phoneIv;
    }

    public String getUserinfoIv() {
        return userinfoIv;
    }

    public void setUserinfoIv(String userinfoIv) {
        this.userinfoIv = userinfoIv;
    }

    public String getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(String userInfo) {
        this.userInfo = userInfo;
    }

    @Override
    public String toString() {
        return "LoginWechat{" +
                "code='" + code + '\'' +
                ", phoneEncryptedData='" + phoneEncryptedData + '\'' +
                ", userinfoEncryptedData='" + userinfoEncryptedData + '\'' +
                ", phoneIv='" + phoneIv + '\'' +
                ", userinfoIv='" + userinfoIv + '\'' +
                ", userInfo='" + userInfo + '\'' +
                '}';
    }
}
